import React,{Component} from 'react';
import {
    View,
    Button,
    StyleSheet
} from 'react-native'

export default class Page1 extends Component {
     static navigationOptions= {
        title:'Page1'
    }
    render() {
        const {navigation} = this.props;
        return (
            <View style = {styles.container}>
                <Button
                    title = 'GO Back'
                    onPress = {()=>{
                        navigation.goBack();
                    }}
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    }
});